class LanguageController < ApplicationController
  def index
    if params[:lang]
      @language = params[:lang]
      session[:language] = @language
      if params[:page] == 'admin'
        redirect_to back
      else
        redirect_to back
      end
    else
      redirect_to root_url
    end
  end
end
